package com.example.ucf.model;

import java.util.ArrayList;


public class Play {
	private ArrayList<Athlete> players;
	private ArrayList<Routes> rotas;
	
	public Play(ArrayList<Athlete> pl, ArrayList<Routes> rt) {
		this.players = pl;
		this.rotas = rt;
	}
	
	public Play() {
		this.players = new ArrayList<Athlete>();
		this.rotas = new ArrayList<Routes>();
	}

	public ArrayList<Athlete> getPlayers() {
		return players;
	}

	public void setPlayers(ArrayList<Athlete> players) {
		this.players = players;
	}

	public ArrayList<Routes> getRotas() {
		return rotas;
	}

	public void setRotas(ArrayList<Routes> rotas) {
		this.rotas = rotas;
	}
	
	public void changeRoute(Athlete atl, Routes newRoute) {
		int idx = players.indexOf(atl);
		rotas.set(idx, newRoute);
	}
	
	public void changePlayer(int position, Athlete atl) {
		players.set(position, atl);
	}
}
